my_list=['P','y','t','h','o','n']
# print(my_list)
print(sorted(my_list,key=None, reverse=False))
print(sorted(my_list,key=None, reverse=True))
print(my_list)

users_list = ["Niuniu", "Niumei", "Niu Ke Le"]
for user in users_list:
    print( f"Hi,{user}!Welcome to Nowcoder!",end="\n")
print("Happy Programmers'Day to everyone!",end="\n")

my_list=[i for i in range(1,1001)]
print(min(my_list),end="/n")
print(max(my_list),end="/n")
x=sum(my_list)
print(x,end="/n")
print(round(x/len(my_list),1))


users_list = ["Niuniu", "Niumei", "HR", "Niu Ke Le", "GURR", "LOLO"]
for user in users_list:
    if user == "HR":
        print("Hi,HR!Would you like to hire someone?")
    else:
        print(f'Hi,{user}!Welcome to Nowcoder!')

# current_users=['Niuniu','Niumei','GURR','LOLO']
# new_users=['GurR','Niu Ke Le','LoLo','Tuo Rui Chi']
# for newuser in new_users:
#     for current_user in current_users:
#         if newuser.upper()==current_user.upper():
#             print("The user name GurR has already been registered!Please change it and try again!")
#             break
#     else:
#         print("Congratulations,the user name Niu Ke Le is available!")

current_users=['Niuniu','Niumei','GURR','LOLO']
new_users=['GurR','Niu Ke Le','LoLo','Tuo Rui Chi']
for newuser in new_users:
    if newuser.upper() in current_users:
        print(f"The user name {newuser} has already been registered!Please change it and try again!")
    else:
        print(f"Congratulations,the user name {newuser} is available!")


order_list=['rice', 'beef', 'chips', 'pizza', 'pizza', 'yogurt', 'tomato', 'rice', 'beef']
sum_money=0
for food in order_list:
    if food=="pizza":
        print('pizza is 10 dollars')
        sum_money+=10
    elif food=="rice":
        print('rice is 2 dollars')
        sum_money+=2
    elif food=='yogurt':
        print('yogurt is 5 dollars')
        sum_money+=5
    else:
        print(f'{food} is 8 dollars')
        sum_money+=8

print(sum_money)
